-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Event Log] Adding type_id
to saved object array in event log
#100939
Conversation
@elasticmachine merge upstream |
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Would we want to fold some of this in as well? #94137 (comment) ? If we didn't have to worry about actions, we could just populate those It would be good to try to capture the action type id as well. Also, would it be useful to try to do one of those "copy" mappings? So we can take the source field once, but use it in > 1 elasticsearch fields? Not quite sure how they work ... |
…-log/rule-type-id
@pmuellr Good idea! Added in this commit: f99ecd0
It seems like the utility of |
After some discussion with @pmuellr and @YulNaumenko, we will be adding the a |
rule_type_id
and primary_saved_object
to event logtype_id
to saved object array in event log
Done in this commit: 3b8b3fa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…-log/rule-type-id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I happened to think - "I wonder if we'll have a problem when users transition from < 7.14 to >= 7.14, and that field doesn't exist?"
I think for this code, everything seems fine - we're passing the value in, and not depending on it being set anywhere in records we're reading from. Could potentially be a problem in the future, if we forget that and are doing searches across different versioned event logs, expecting it to be set. But given the TS typing on these ends up being string | undefined
, I think we'll be fine - at least TS type-wise (for example, getting an unexpected null dereference at runtime).
Just bringing that up in case anyone happens to think of other cases where that could be a problem, but I think we're fine.
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @ymao1 |
…tic#100939) * Adding new fields to event log mapping * Populating new event log fields when executing rules and actions * Fixing functional tests * Adding actionTypeId * Putting type ids into saved object array * Fixing functional tests * Cleanup Co-authored-by: Kibana Machine <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
) (#101444) * Adding new fields to event log mapping * Populating new event log fields when executing rules and actions * Fixing functional tests * Adding actionTypeId * Putting type ids into saved object array * Fixing functional tests * Cleanup Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: ymao1 <[email protected]>
* master: (90 commits) Fix UI breaks on providing long search keyword in 'Search Box' (elastic#101385) Adds css class to EuiDescriptionListDescription in order to break word on exception details card (elastic#101481) [Lens] Increase timings for drag and drop tests (elastic#101380) [Lens] Fix editor react error on configuration panel (elastic#101367) [Fleet] Move integrations to a separate app (elastic#99848) Fix incorrect message displayed on importing Timeline Templates (elastic#101288) [Cases] RBAC (elastic#95058) [APM] Visual improvements for new APM layout with left navigation (elastic#101360) [master] More precise alerts matching (elastic#99820) [Lens] Value in legend (elastic#101353) Revert "[Reporting] ILM policy for managing reporting indices (elastic#100130)" (elastic#101358) [Discover] Fix header row of data grid in Firefox (elastic#101374) Add link to advanced setting in Discover (elastic#101154) Url service locators (elastic#101045) [Timelion] Update the removal message to mention the exact version (elastic#100994) [Security Solution][Detection Engine] Test cases for alias failure test cases where we don't copy aliases correctly (elastic#101437) [Event Log] Adding `type_id` to saved object array in event log (elastic#100939) [Reporting] Add `location.url` info to console message logs (elastic#101427) [Security Solutions][Detection Engine] Fixes timestamp bugs within source indexes when the formats are not ISO8601 format (elastic#101349) Improve Task Manager instrumentation (elastic#99160) ...
Resolves #95411
Summary
Added
type_id
to saved object array field inside the event log. This captures theruleTypeId
for analert
saved object and theactionTypeId
for an `action saved object.Checklist
Delete any items that are not applicable to this PR.